<!--
	作者：2575202388@qq.com
	时间：2019年8月6日17:11:48
	描述：书籍管理搜索
-->
<template>
    <div style="width:100%;height:500px;"> 
        <Tetable ref="tdtable" height="410" :columns="columns9" type="post" :paramiters="tj" :serverUrl="serverUrl" @getSelection="getSelection"></Tetable>
        <lookxdth ref="lookxdth" :lookparam="lookparam" @setshzt="setshzt"></lookxdth> 
    </div> 
</template>
<script>
	import lookxdth from "./lookxdth";
    export default {
    	name: "xdthss",
    	props: {
    		tj:{
    			type: Object
    		},	
    	},
        data () {
            return {
            	serverUrl:"/host/readbook/sjgl/Search_XdthByBid.html",
                columns9: [
                 	{
                        type: 'selection',
                        width: 60,
                        align: 'center'
                    },
                    {
                        type: 'index',
                        width: 60,
                        title: '序号',
                        align: 'center'
                    },{
                        title: '书名',
                        key: 'BOOKNAME',
                        align: 'center', 
                    }, {
                        title: '姓名',
                        key: 'USERNAME',
                        align: 'center', 
                    }, {
                        title: '年级',
                        key: 'NJ',
                        align: 'center', 
                    }, {
                        title: '班级',
                        key: 'BJ',
                        align: 'center', 
                    },{
                        title: '操作',
                        key: 'action',
                        width: 100,
                        align: 'center',
                        render: (h, params) => {
                            return h('a', { 
	                        	on: { 
	                        		click: () => {
	                        			this.lookparam=params.row;
	                        			this.$refs.lookxdth.modal0=true;
	                        		}
	                        		
	                        	} 
                        	},"审核")
                        }
                    }
                ],
                lookparam:{}
            }
        },
        computed: {
		},
		methods: {
			setshzt(sh){
				var learnid=this.lookparam.LEARNID;
				const params={
					sh:sh,
					learnid:learnid
				};
				this.$http.post("/host/readbook/sjgl/xdthSh.html",params)
				.then(result => {
					this.$Message.info('审核成功');
					this.$refs.lookxdth.modal0=false;
					this.$refs.tdtable.load();
				});
			},
			load(){
				this.$refs.tdtable.load();
			},
			
			getSelection(datas){
				var selects=[...datas];
				this.$emit('getSelection',selects);
			}
	    },
		mounted() {
		},
		watch:{
		},
		components: {
			lookxdth
		}
    }
</script>


<style scoped="scoped">
	
	.ivu-table-wrapper {
		border:none;
	}
	
	.toolstipdiv{
		width: '100%';
		overflow: 'hidden';
		textOverflow: 'ellipsis';
		whiteSpace: 'normal';
		wordBreak: 'break-all';
		color:'#fff';
		text-align: center;
	}
	.toolstipdiv:hover{
		background:rgb(63, 193, 201);
	}
	
	.ivu-tooltip-rel label:hover{
		color:#0023FB;
	}
	
	.tablediv{
		height: '40px';
		overflow:'hidden';
		line-height: '40px';
	}
</style>



